<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>增加小程序信息</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../elementUI/index.css">
  <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
  <div id="app" class="minWidth">
    <el-form :model="form" ref="contract" :rules="rules" inline-message="true" style="width: 100%">
      <div class="table_titel">
        <div class="titel">增加小程序信息</div>
      </div>
      <el-descriptions :column="2" border size="small">
        <el-descriptions-item label="AppID">
          <el-form-item prop="App_ID">
            <el-input v-model.trim="form.App_ID" @change="getAppID" placeholder="请输入小程序AppID"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="密钥">
          <el-form-item prop="App_Secret">
            <el-input v-model.trim="form.App_Secret" placeholder="请输入小程序密钥"></el-input>
          </el-form-item>

        </el-descriptions-item>
        <el-descriptions-item label="小程序名称">
          <el-form-item prop="App_Name">
            <el-input v-model.trim="form.App_Name" placeholder="请输入小程序小程序名称"></el-input>
          </el-form-item>

        </el-descriptions-item>
        <!-- <el-descriptions-item v-if="form.Enterprise_Info_SerialNumber === '0'" label="商户号">
          <el-form-item prop="mchid">
            <el-select v-model.trim="form.Children.mchid" placeholder="商户号" filterable style="width: 100%">
              <el-option v-for="(item,index) in mchidData" :key="index" :label="item.mchid"
                :value="item.mchid"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item label="样式方案名称">
          <el-form-item prop="Children.App_Style_SerialNumber">
            <el-select v-model.trim="form.Children.App_Style_SerialNumber" placeholder="样式方案名称" filterable style="width: 100%">
              <el-option v-for="(item,index) in list" :key="index" :label="item.App_Style_Name"
                :value="item.App_Style_SerialNumber"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item> -->
      </el-descriptions>
      <div class="table_titel">
        <div class="titel">绑定企业及商户号</div>
        <div>
          <el-button type="primary" size="small" @click="editMember()">新增</el-button>
          <el-button type="danger" size="small" @click="deletMember()">删除</el-button>
        </div>
      </div>
      <el-descriptions :column="3" border size="small" v-for="(item,index) in form.Children.enterprise_appid_detail">
        <el-descriptions-item label="企业">
          <el-form-item prop="Enterprise_Info_SerialNumber">
            <el-select v-model.trim="item.Enterprise_Info_SerialNumber" placeholder="请选择企业" filterable style="width: 100%">
              <el-option v-for="(item,i) in enterpriseData" :key="i" :label="item.Enterprise_Name"
                :value="item.Enterprise_Info_SerialNumber"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>

        <el-descriptions-item label="商户号">
          <el-form-item prop="mchid">
            <el-select v-model.trim="item.mchid" placeholder="请选择商户号" filterable style="width: 100%">
              <el-option v-for="(item,index) in mchidData" :key="index" :label="item.mchid"
                :value="item.mchid"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="样式方案名称">
          <el-form-item prop="Children.App_Style_SerialNumber">
            <el-select v-model.trim="item.App_Style_SerialNumber" placeholder="请选择样式方案名称" filterable style="width: 100%">
              <el-option v-for="(item,index) in list" :key="index" :label="item.App_Style_Name"
                :value="item.App_Style_SerialNumber"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>

      <el-form-item class="form-operation">
        <el-button @click="window.history.back()">返回</el-button>
        <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
  <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../js/vue.min.js"></script>
  <script type="text/javascript" src="../../../elementUI/index.js"></script>
  <script type="text/javascript" src="../../../js/utils.js"></script>
  <script type="text/javascript" src="../../../js/ID_Validity.js"></script>
  <script type="text/javascript" src="../../../js/compressor.js"></script>
  <script type="text/javascript" src="./js/Add.js"></script>
</body>

</html>